System and method for procedurally generated building graphics within a street network of a three-dimensional virtual environment

ABSTRACT

A system and method of procedural generation of graphics corresponding to a plurality of buildings in a three-dimensional virtual environment includes identifying a region in the three-dimensional virtual environment that is enclosed by a plurality of streets within the three-dimensional virtual environment, generating a two-dimensional arrangement of a plurality of tiles within the region, identifying one building segment graphic in the subset of building segment graphics corresponding to each tile based on an array of pseudo-random index values stored in the memory for each tile in the plurality of tiles, and generating a graphical depiction of the three-dimensional virtual environment including a graphical depiction of the plurality of buildings in the region based on the two-dimensional arrangement of the plurality of tiles and the building segment graphic identified for each tile in the plurality of tiles.

FIELD

This disclosure relates generally to the field of computer graphics and,more specifically, to systems and methods for procedural generation ofgraphics representing buildings in three-dimensional computer graphics.

BACKGROUND

Many modern software applications display three-dimensionalrepresentations of virtual environments as part of a user interface.Three-dimensional (3D) graphics are used in a wide range of applicationsincluding video games, simulations, virtual and augmented realityapplications, geospatial information applications, and applications formapping and navigation. In many applications, 3D graphics are moreuseful than two-dimensional (2D) graphics at depicting real-worldenvironments and locations because the normal interaction between humansand the real-world occurs in three dimensions.

To display three-dimensional graphics, the computing system requiresgeometry information for structures and other items in thethree-dimensional virtual environment along with various other pieces ofdata including textures and lighting information to perform theprocessing to produce a graphical depiction of the virtual environment.In some instances, a large number of comparatively small graphicalmodels, such as buildings, are displayed within the virtual environment.Storing individual graphical models for a large number of buildings isoften impractical, so some prior art systems employ various techniquesfor procedural generation to display groups of buildings using acomparatively small set of geometric data that can be stored in memoryin a practical manner. Procedurally generated graphics refer tographics, including 3D graphics, which a computing device generatesusing a comparatively small set of stored graphics data including modelsand textures and one or more computational algorithms to constructcomplex graphical scenes from the stored graphics data instead ofstoring precise geometric models for the entire virtual environment. Forexample, generating a cluster of buildings from a set of a fewindividual building models stored in the memory is one application ofprocedurally generated graphics.

While procedurally generated graphics reduce the requirements forcomplex pre-generated graphical models for a virtual environment, theprior art procedural graphics generation techniques also requiresubstantial computing resources which are often unavailable in manyembedded and lower-power computing devices such as in-vehicle navigationsystems and mobile electronic devices. In particular, prior artgraphical generation techniques for a large number of buildings that arearranged between blocks of streets in an urban or suburbanthree-dimensional environment may not be practical for use with lowerpower devices. For example, online mapping services such as Google Mapsand Apple Maps require mobile device users to download predeterminedmodels for all three-dimensional building models. In a dense environmentwith a large number of buildings, the requirement to download allbuilding models requires the mobile electronic device to consume largeamounts of network bandwidth and battery power. Consequently, improvedtechniques for procedural generation of graphics for large numbers ofbuildings in a computationally efficient manner would be beneficial.

SUMMARY

In one embodiment, a method for generating graphics corresponding to aplurality of buildings in a three-dimensional virtual environment hasbeen developed. The method includes identifying, with a processor, aregion in the three-dimensional virtual environment that is enclosed bya plurality of streets within the three-dimensional virtual environment,generating, with the processor, a two-dimensional arrangement of aplurality of tiles within the region, each tile corresponding to asubset of building segment graphics in a plurality of building segmentgraphics stored in a memory, identifying, with the processor, onebuilding segment graphic in the subset of building segment graphics foreach tile in the plurality of tiles based on an array of pseudo-randomindex values stored in the memory, each index value corresponding to onebuilding segment graphic in the subset of building segment graphics, andgenerating, with the processor and a display device, a graphicaldepiction of the three-dimensional virtual environment including agraphical depiction of the plurality of buildings in the region based onthe two-dimensional arrangement of the plurality of tiles and the onebuilding segment graphic identified for each tile in the plurality oftiles.

In another embodiment, a graphics display system that generatesgraphical representations of a three-dimensional virtual environment.The system includes a display device, a memory configured to store datacorresponding to a three-dimensional virtual environment including aplurality of streets and a plurality of building segment graphics forbuildings in the three-dimensional virtual environment, and a processoroperatively connected to the memory and the display device. Theprocessor is configured to identify a region in the three-dimensionalvirtual environment that is enclosed by the plurality of streets withinthe three-dimensional virtual environment, generate a two-dimensionalarrangement of a plurality of tiles within the region, each tilecorresponding to a subset of building segment graphics in the pluralityof building segment graphics, identify one building segment graphic inthe subset of building segment graphics for each tile in the pluralityof tiles based on an array of pseudo-random index values stored in thememory, each index value corresponding to one building segment graphicin the subset of building segment graphics, and generate a graphicaldepiction of the three-dimensional virtual environment with the displaydevice, the graphical depiction including a plurality of buildings inthe region based on the two-dimensional arrangement of the plurality oftiles and the one building segment graphic identified for each tile inthe plurality of tiles.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic diagram of a computing device that is configuredto generate three-dimensional (3D) graphics including procedurallygenerated buildings in a 3D virtual environment.

FIG. 2 is a block diagram of a process for procedural generation anddisplay of buildings within a street network in a 3D virtualenvironment.

FIG. 3 is a block diagram of a process for identifying regions that areenclosed by streets in the 3D virtual environment during the process ofFIG. 2.

FIG. 4 is a diagram depicting a connected graph for a street networkthat the system of FIG. 1 uses to generate polygons around identifiedregions that include procedurally generated buildings in a 3D virtualenvironment.

FIG. 5 is an illustrative diagram of tile groups for two different tilesizes with an example of type codes that correspond to a two-dimensionalarrangement of the tiles.

FIG. 6 is a diagram depicting two-dimensional arrangements of differenttile sizes to fill a rectangle in a region of the 3D virtual environmentthat includes the procedurally generated buildings and a set ofpseudo-random index data that the system of FIG. 1 uses to selectdifferent sets of building segment graphics for different tiles.

FIG. 7 is a set of graphical depictions of a 3D virtual environment withdifferent regions that include different sets of procedurally generatedbuildings during day, night, and snow environmental conditions.

FIG. 8 is a set of illustrative depictions of a building segment withdifferent graphical effects applied to the building segment based ontime of day and season in the 3D virtual environment.

DETAILED DESCRIPTION

For the purposes of promoting an understanding of the principles of theembodiments disclosed herein, reference is now be made to the drawingsand descriptions in the following written specification. No limitationto the scope of the subject matter is intended by the references. Thepresent disclosure also includes any alterations and modifications tothe illustrated embodiments and includes further applications of theprinciples of the disclosed embodiments as would normally occur to oneskilled in the art to which this disclosure pertains.

As used herein, the terms “three-dimensional (3D) virtual environment”or more simply “virtual environment” refer to a set of geometric,texture, and other graphical data that are stored in a memory of acomputer system to enable the computer system to generate a graphicaldepiction of a space with three visually perceivable dimensions, whichare often projected onto a two-dimensional video display device or canbe displayed using a three-dimensional viewing device. While not arequirement, many three-dimensional virtual environments representgeographical regions on Earth including graphical representations ofland, water, the sky, lighting, and other environmental effects thatprovide a visual representation of the environment on Earth. The virtualenvironment data include topographic information such as the elevationand inclines of land features, locations of water, as we as othergeographic features. Artificial structures such as buildings, streets,bridges, and the like can be depicted within the three-dimensionalvirtual environments. Additionally, the three-dimensional virtualenvironment often includes regions that correspond to man-madestructures including streets and buildings. As described in furtherdetail below, the computer systems taught herein generate graphicaldepictions of the three-dimensional virtual environment that includeprocedurally generated building graphics in regions of the 3D virtualenvironment that are surrounded by streets in a street network.

As used herein, the term “building” refers to a three-dimensionalstructure that is located in the 3D virtual environment to provide agraphical depiction of a man made structure within the 3D virtualenvironment. The term “building segment” refers to a graphical structurethat can form an entire building by itself or be placed adjacent toother building segments to form one or multiple larger contiguousbuilding structures. Different building segments are generated to bealigned with different neighboring building segments to enablegeneration of graphics for a large building from multiple buildingsegments or to represent groups of adjacent buildings that form a blockin the 3D virtual environment. As described in more detail below, amemory stores multiple sets of interchangeable building segment graphicsto enable the system to produce a wide variety of procedurally generatedbuildings using different combinations of building segments. In mostinstances, the building structures extend from a ground surface in the3D virtual environment. The systems and methods described herein enableprocedural generation of building structures within a three-dimensionalvirtual environment without requiring that specific model data for eachbuilding within the 3D virtual environment.

FIG. 1 depicts a graphics display system 100 that generates graphicalrepresentations of a three-dimensional virtual environment. Non-limitingexamples of the system 100 include in-vehicle navigation systems, mobileelectronic devices such as smartphones, tablets, or wearable computingdevices, and other embedded computing systems that generate graphicaldepictions of three-dimensional virtual environments. FIG. 1 depicts acomputing system 100 that generates a graphical display of a 3D virtualenvironment including a representation of ground, such as the surface ofthe Earth, with ground lighting and wall lighting textures applied tothe regions surrounding the structures and to the polygons that depictwalls of the structures. The computing system 100 includes a processor108, memory 120, display 144, user input devices 146, optionalpositioning system 148, and optional network device 152. Hardwareembodiments of the computing system 100 include, but are not limited to,personal computer (PC) hardware, embedded system hardware includingembedded computing hardware for use in a motor vehicle, and mobileelectronic devices including smartphone and tablet computing devices.

In the computing system 100, the processor 108 includes one or moreintegrated circuits that implement the functionality of a centralprocessing unit (CPU) 112, a graphics processing unit (GPU) 116, and aclock 118. In some embodiments, the processor is a system on a chip(SoC) that integrates the functionality of the CPU 112 and GPU 116, andoptionally other components including the memory 120, network device152, and positioning system 148, into a single integrated device. In oneembodiment, the CPU is a commercially available central processingdevice that implements an instruction set such as one of the x86, ARM,Power, or MIPs instruction set families. The GPU includes hardware andsoftware for display of both 2D and 3D graphics. In one embodiment,processor 108 executes software drivers and includes hardwarefunctionality in the GPU 116 to generate 3D graphics using the OpenGL,OpenGL ES, Vulkan, Metal, or Direct3D graphics application programminginterfaces (APIs). For example, the GPU 116 includes one or morehardware execution units that implement vertex shaders and fragmentshaders for the processing and display of 2D and 3D graphics. Duringoperation, the CPU 112 and GPU 116 execute stored programmedinstructions 140 that are retrieved from the memory 120. In oneembodiment, the stored programmed instructions 140 include operatingsystem software and one or more software application programs thatgenerate 3D graphics, including mapping and navigation applications,virtual reality applications, game applications, simulationapplications, and any other software that is configured to generate 3Dgraphics. The processor 108 executes the mapping and navigation programand generates 2D and 3D graphical output corresponding to maps and mapfeatures through the display device 144. The processor is configuredwith software and hardware functionality by storing programmedinstructions in one or more memory devices operatively connected to theprocessor and by operatively connecting the hardware functionality tothe processor and/or other electronic, electromechanical, or mechanicalcomponents to provide data from sensors or data sources to enable theprocessor to implement the processes and system embodiments discussedbelow.

In the processor 108, the clock 118 is a timing device that maintains atime value using a predetermined format (e.g. seconds since the epoch)that the system 100 can use for various purposes including identifyingthe time of year in the physical environment that is external to thesystem 100 using a calendar software program. In some embodiments thesystem 100 periodically sets the clock 118 based on data received viathe network device 152 from external time servers using, for example,the network time protocol (NTP) or from timing data received fromexternal transmitters via the positioning system 148.

The memory 120 includes both non-volatile memory and volatile memory.The non-volatile memory includes solid-state memories, such as NANDflash memory, magnetic and optical storage media, or any other suitabledata storage device that retains data when the in-vehicle informationsystem 100 is deactivated or loses electrical power. The volatile memoryincludes static and dynamic random access memory (RAM) that storessoftware and data, including graphics data and map feature data, duringoperation of the in-vehicle information system 100. In addition to theprogrammed instructions 140, the memory 120 includes 3D virtualenvironment data 124, graphics models for one or more sets of buildingsegments 128, data corresponding to one or more tile groups 132 thatinclude type codes for each tile and a mapping to the building segmentgraphics 128, and pseudo-random building segment index arrays 136. The3D virtual environment data 124 includes a model of a virtualenvironment include ground terrain information, streets that extendthrough regions of the terrain, and structures that are not procedurallygenerated, such as unique landmarks within the 3D virtual environment.The 3D virtual environment data include vertices with three-dimensionalcoordinates that define a series of interconnected polygons, such astriangles, that form the shape of various features within the 3D virtualenvironment.

In the memory 120, the building segment graphics data 128 includesthree-dimensional models for various types of procedurally generatedbuildings in the 3D virtual environment. Some of the building segmentsinclude complete models for buildings that can arranged next to eachother in a block and other building segments form portions of largerstructures that are formed from smaller structural elements. In oneembodiment, each set of building segment graphics is organized logicallya two-dimensional array in the memory 120 with the geometric model foreach building segment corresponding to a type code for one of the tiles132 on one axis and an arbitrarily assigned index number thatcorresponds to one of the index numbers in the random building segmentindex arrays 136. Thus, for any given tile with a given type code, thebuilding segment graphics data 128 include at least one set of graphicsdata with a plurality of suitable building segments, which provides agreater variation in the arrangements of buildings in the 3D virtualenvironment since different regions correspond to different arrays ofpseudo-random index numbers that select different building segmentgraphics for the different regions. The building segment data 128optionally contains multiple sets of building segment graphics toaccommodate multiple tile sizes in the tile group data 132 or to havedifferent sets of model graphics for different building architecturalstyles. Additionally, the building segment graphics 132 optionallyinclude textures, lighting effects, and other stored graphical shaderprograms or graphical effects that enable the system 100 to applydifferent graphical effects to a single set of geometric buildingsegment models to generate graphics that depict different lightingconditions (e.g. day and night) or graphics that depict the buildingsduring different seasonal and weather conditions.

In the memory 120, the tile group data 132 includes a plurality of“tiles” that each represent a two-dimensional region that corresponds toa portion of the building segments in the building segment data 128. Asdescribed below, each tile is assigned a four bit type code thatdescribes the layout of adjacent neighboring tiles and identifies asubset of the building segment graphics data 128 that is suitable foruse with each tile. For example, a type code indicating that the leftand bottom side of a tile borders other tiles and that the top and rightside of the tile borders the street corresponds to sets of buildinggraphics in the building segment data 128 that have the appropriatevisual appearance to represent buildings at a northeast corner of ablock bordered by two streets where the block includes additionalbuildings to the south and west of the corner. In a two-dimensionalarrangement of tiles, each tile includes a four bit type code thatspecifies up to sixteen different sets of adjacent tiles (or no adjacenttiles). The tile data 132 optionally include multiple tile groups, whereeach tile group corresponds to tiles of a particular size, and differenttile groups include larger or smaller tile sizes that correspond tographical models for larger and smaller building segments. The type codefor each tile is associated with a plurality of different buildinggraphic segment models 128 to provide visual variation in the 3D virtualenvironment. The random tile index array 136 includes multiple numericarrays of indices into the building segment graphics for each tile code.The random tile index data are generated in a random or pseudo-randommanner and stored in the memory 120 to control the selection of buildingsegment graphics in a deterministic manner. The random tile index arraydata 136 enables the system 100 to generate graphics with procedurallygenerated buildings that provide an appearance of randomness in the 3Dvirtual environment but that can be regenerated by the system 100 in adeterministic manner to enable the system 100 to generate the same setof buildings in a consistent manner at different times of operation.

The computing system 100 includes an optional network device 152 that isconfigured to send and receive data from external computing systemsthrough a data network (not shown). Examples of the network device 152include wired network adapters such as Ethernet and universal serial bus(USB) adapters, and wireless network adapters such as 3G or 4G wirelesswide area network (WWAN), 802.11 or Bluetooth wireless local areanetwork (WLAN) adapters. In some embodiments, the processor 108retrieves virtual environment data 124, structure model polygon data128, and texture data 132 from an external network for storage in thememory 120. In some embodiments, the memory 120 caches the graphics dataand the processor 108 stores additional graphical data that is receivedthrough the network device 152 to update the contents of the memory 120.

The computing system 100 includes an optional positioning system device148 that is operatively connected to the processor 108. Examples ofpositioning systems include global positioning system (GPS) receivers,radio triangulation receivers that identify a location of the computingsystem 100 with respect to fixed wireless transmitters, and inertialnavigation systems. During operation, the processor 108 executes mappingand navigation software applications that retrieve location informationfrom the positioning system 148 to identify a geographic location of thecomputing system 100 and to adjust the display of the virtualenvironment to correspond to the location of the computing system 100.In navigation applications, the processor 108 identifies the locationand movement of the computing system 100 for the generation of routes toselected destinations and display of the routes in the 3D virtualenvironment.

In the computing system 100, the display 144 is either an integrateddisplay device, such as an LCD or other display device, which isintegrated with a housing of the computing system 100, or the display144 is an external display device that is operatively connected to thecomputing system 100 through a wired or wireless interface to receiveoutput signals from the processor 108 to generate a display of the 3Dvirtual environment. In an embodiment where the computing system 100 isan in-vehicle embedded computing device, the display 144 is an LCD orother flat panel display that is located in the console of a vehicle, orthe display 144 is a head-up display (HUD) or other projection displaythat displays the 3D virtual environment on a windshield or otherdisplay surface in the vehicle. In the computing system 100, the inputdevice 146 is, for example, a touchscreen input device that isintegrated with the display 144, a voice input device, or anothersuitable device that receives input data from an operator of the system100.

FIG. 2 depicts a process 200 for the procedural generation of buildinggraphics within regions a 3D virtual environment that are enclosed bystreets within the 3D virtual environment. In the discussion below, areference to the process 200 performing a function or action refers toan operation of a processor to execute stored program instructions toperform the function or action in association with other components in agraphics display system. The process 200 is described in conjunctionwith the system 100 of FIG. 1 and the depictions of FIG. 4-FIG. 8 forillustrative purposes.

Process 200 begins as the processor 108 identifies a region in thethree-dimensional virtual environment that is enclosed by a plurality ofstreets within the three-dimensional virtual environment (block 204). Asdescribed above, the 3D virtual environment data 124 includes a networkof streets within the 3D virtual environment that enclose geographicareas, such as grids of streets in urban settings that enclose blockswith buildings. As is described in more detail below in FIG. 3, theprocessor 108 identifies two-dimensional regions that are enclosed bythe street network. In one embodiment, the processor 108 generates apolygon corresponding to each region that is enclosed by streets. FIG. 4provides an illustrative example of a section of the street network 404including a plurality of streets that surround a region 406. Asdescribed in FIG. 3, the processor 108 traverses multiple sets ofdirected graph edges to identify the region 406 within the streetnetwork and generate a bounding polygon 416 that corresponds to thestreets that form boundaries to enclose the region 406. In the processesdescribed herein, the bounding polygon surrounds the region in twodimensions without considering height. During the generation of thebuilding graphics, the processor 108 positions the buildings on thesurface of the land or other surfaces within the region 406 based on theheight coordinates that are present in the three-dimensional virtualenvironment data 124.

The process 200 continues as the processor 108 generates a “maximumrectangle” corresponding to a rectangle that covers all or as much ofthe enclosed region as can be covered with a single rectangular polygon(block 208). In one embodiment, the processor 108 generates a rectanglestarting from each vertex of the polygon that encloses the region, suchas each vertex of the polygon 416 in FIG. 4, and expands the rectangleuntil the rectangle reaches the sides of the polygon 416. The processor108 uses the rectangle with the largest area as the maximum rectanglethat occupies a portion of the polygon. FIG. 4 depicts a maximum sizedrectangle 418 with an inner region 424 within the trapezoidal polygon416. Some regions have rectangular shapes and the rectangle with themaximum size matches the full size of the region. For some regions withmore complex shapes and sufficient size to accommodate building models,the processor 108 subdivides the region into multiple rectangles andperforms the remaining operations of the process 200 in each rectanglewithin the region.

Process 200 continues as the processor 108 generates a two-dimensionalarrangement of tiles corresponding to the predetermined building segmentgraphics to fill the rectangular portion of the region (block 212). Inthe embodiment of the system 100, the processor 108 fills therectangular region with a selection two different tile sizes, althoughalternative embodiments use a single tile size or more than two tilessizes. In the system 100, each size of tile is also referred to as a“tile group”. FIG. 5 depicts two different tile groups 504 and 508. Thetile group 504 depicts a smaller tile size and the group 508 depicts alarger tile size. The system 100 uses the smaller tiles 504 to fillsmaller regions between streets and to fill margins of larger areas thatcannot include additional tiles of the larger size. The larger tiles 508enable the system 100 to fill in larger regions in an efficient mannerduring the process 200, and the smaller tiles enable increased coverageof the procedurally generated buildings within different regions of the3D virtual environment.

As depicted in FIG. 5, each tile in the tile groups 504 and 508 isassigned a predetermined type code, such as a four-bit code depicted inFIG. 5 to generate sixteen tiles in each tile group. During the process200, the processor 108 assigns one of the type codes to each tile basedon sides of the tile that are adjacent to other tiles, if any, in thetwo-dimensional arrangement of the tiles. The type code assigned to eachtile indicates the types of adjacent neighboring tiles that may bearranged next to the tile. For example, in FIG. 5 the four bit typecodes correspond to the top (512), bottom (516), left (520), and right(524) sides of each tile, with a binary value of “1” indicating that acorresponding side of the tile neighbors another tile within thetwo-dimensional arrangement of tiles. The building segment graphics forthe different tile codes are generated with a structure thataccommodates the neighboring tiles based on the type codes. A “0” valuein the type code for a particular side indicates that the buildingsegments associated with the tile have graphics for an exterior face ofa building on a particular side. As depicted in FIG. 5, atwo-dimensional arrangement of nine tiles 528 is formed with the typecodes depicted in the two-dimensional arrangement 532.

Each type code references a set of multiple building segment graphicsstored in the memory 120 that are suitable for being placed next to thecorresponding adjacent tiles in the arrangement. For example, thecentral tile with code “1111” corresponds to a set of building segmentgraphics that have connectors or other graphical elements to accommodateneighboring building segments on all four sides of the tile, such as acentral hall or other central segment of a building that is connected towings and other structures. On the exterior of the tile arrangement 532,the type codes refer to sets of building segment graphics that haveselected sides to connect to adjacent tiles for sides with type “1” and,for exterior tiles, the building structure elements include exteriorwalls and other elements that correspond to the exterior of a buildingthat is visible from the street in the three-dimensional virtualenvironment for sides with type “0”. The type code “0000” is used for abuilding segment that corresponds to a complete building for use insmaller regions where a smaller region being covered by a single tile issurrounded by the streets in the three-dimensional virtual environment.

As depicted in FIG. 6, during the process 200 the processor 108 fillsthe rectangular region 418 with tiles from one or more tile groups togenerate the two-dimensional arrangement of tiles. In the example ofFIG. 6, the processor 108 partially fills the region 418 with the largertiles 608 and subsequently fills in a portion of the remaining areawithin the region 418 with the smaller tiles 612. In some instances,such as in FIG. 6, a small portion of the rectangle remains uncovered byany tiles, and in some embodiments the system 100 uses a predeterminedground texture or other graphical effect to simulate grass, sidewalks,or other terrain features that are commonly found around the borders ofbuildings.

The process 200 continues as the processor 108 optionally selects a setof building segment graphics based on a geographic location of thedisplayed regions corresponding to the physical world and optionallywith reference to time of day and weather data (block 216). For example,in a navigational application the processor 108 identifies locationcoordinate data in the 3D virtual environment data 124 that correspondsto a geographic region on Earth. The processor 108 selects one set ofbuilding segment graphics from the building graphics data 128 in thememory 120 that corresponds to an architectural style for buildingswithin a predetermined geographic region. For example, if the 3D virtualenvironment displays an urban environment in a city in Germany, then theprocessor 108 retrieves a set of building segments 128 from the memory120 that correspond to European or German architecture to provide a morerealistic set of procedurally generated graphics. In some embodiments,the building segment data 128 stores sets of building segment data forarchitectural styles in different geographic regions that the system 100displays during operation. In one embodiment where the system 100 isincorporated with a vehicle navigation system, the system 100 receivesupdated sets of building segment data via the network device 152 as thevehicle travels through different geographic regions to enable thememory 120 to store sets of building segment data that correspond tobuilding architectures that are typically found in the geographicregions through which the vehicle travels.

The process 200 continues as the processor 108 selects one buildingsegment in a subset of the plurality of building segment data 128 in thememory 120 for each tile in the region based on the pseudo-random indexdata 136 to select one building segment from the building segment data128 (block 220). In the system 100, the memory 120 stores a plurality ofpseudo-random tile index arrays 136 that map a single tile type code tomultiple building segment graphics that are stored in the selected setof building graphics for a particular region. The processor 108 uses ahash function or other mapping to select one of the pseudo-random indexarrays 136 from the memory 120 based on, for example, the coordinates ofthe region within the 3D virtual environment or some other fixed valuethat is associated with the region. As noted above, each type code valuefor a given tile corresponds to a subset of different building segmentgraphics (e.g. one column of different building segment graphics in atwo-dimensional table). The processor 108 uses the pseudo-random indexvalue from the random building segment index data 136 to identify oneset of building segment graphics from the selected subset (e.g. the typecode and the index value act as column and row identifiers for theprocessor to select one set of building segment graphics in thetwo-dimensional table). Thus, the system 100 produces procedurallygenerated graphics for each region within the three-dimensional virtualenvironment that appear to be random to the user of the system 100 butthe system 100 also regenerates the same set of procedurally generatedgraphics for the same region in a consistent manner during operation ofthe system 100.

Using FIG. 6 as an example, the tiles 632 represent a portion of therectangle within a region of the three-dimensional virtual environmentthat receives procedurally generated buildings. The processor 108selects a set of pseudo-random index sequences 636 that correspond todifferent sets of building segment graphics for each of the tiles thatare selected from a suitable set of building segments based on the typecodes of each tile. In one embodiment, each of the tiles 632 and 640 isconsidered to have a single type code (e.g. 1111) in a map region withgrids of streets that surround each tile, but the system 100 selectsdifferent sets of building graphics for the tiles that each have thesame type code in a pseudo-random manner. In the example of FIG. 6, asubset of the building segment graphics data 128 includes threedifferent individual building segment graphics models, which are indexed1-3, for the corresponding type code of each tile, which is 1111 forreach tile in the example of FIG. 6. The processor 108 selectsindividual sets of building segment graphics in the tiles 640 based onthe tile type codes and the pseudo-random sequence 636. If the number oftiles exceeds the length of the pseudo-random sequence, then theprocessor 108 returns to the start of the sequence to select thebuilding segment graphics that are associated with each tile type andgraphics index number. For example, in FIG. 6 the four-digitpseudo-random sequence 636 includes index values 2, 3, 1, 2 fordifferent building segment graphics. In the tiles 640, the processor 108assigns four tiles the values 2, 3, 1, 2 and returns to the first value(2) in the pseudo-random sequence for the fifth tile. The processor 108uses the geographic coordinates of the region to identify the samepseudo-random sequence for the tiles in the region to enable the system100 to present a consistent set of procedurally generated buildinggraphics within the region during operation of the system 100.

The process 200 continues as the processor 108 generates a graphicaldepiction of the 3D virtual environment including the procedurallygenerated buildings within the region of the three-dimensional virtualenvironment that is enclosed by the streets (block 224). In the system100, the CPU 112 and GPU 116 generate the graphical depiction of the 3Dvirtual environment based on the 3D virtual environment and streetnetwork data 124. The processor 108 also generates the graphics for theselected building segment data 128 in the tile locations for each of theregions that are enclosed by the street network using the buildingsegment data for each tile type and pseudo-random index in the set ofbuilding segment graphics. The system 100 generates the graphicsincluding the procedurally generated buildings for each of theidentified regions that the processor 108 renders for graphical outputvia the display device 144.

FIG. 7 and FIG. 8 include illustrative graphical depictions of theprocedurally generated buildings within the 3D virtual environment. FIG.7 includes four graphical depictions 704, 714, 724, and 734 of the 3Dvirtual environment during different time and weather conditions, suchas daytime (704), night time (714), during snowing conditions in winter(724). In the processor 108, the clock 118 provides time informationthat enables generation of graphics in the three-dimensional virtualenvironment corresponding to the time of day and the time of year in thephysical environment that is external to the system 100. As depicted inthe view 704, the two regions 706A and 706B are both enclosed by streetswithin the 3D virtual environment. The system 100 performs theprocedural generation process 200 for the buildings within each of theregions 706A and 706B to generate sets of buildings that are differentfor both of the regions 706A and 706B. As describe above, thepseudo-random process for building segment generation enables the system100 to reproduce the same sets of buildings for each region at differenttimes of operation of the system 100. Thus, in the display 714, theregions 716A and 716B include the same buildings that are depicted inthe display 704, but the system 100 applies lighting effects or changesappearance textures to depict the buildings at night instead of duringthe day. Similarly, the regions 726A and 726B of the display 724 includethe same building segments in the displays 704 and 714 but withadditional graphical effects to depict the procedurally generatedbuildings during the winter.

FIG. 8 illustrates of different graphical effects that the GPU 118 canapply to a single building segment 804 using, for example, programmableshaders to implement graphical effects and apply one or more textures tothe building graphical model to modify the visual depiction of a singlebuilding within the region of the 3D virtual environment. For example,in one embodiment the processor 118 identifies a color parameter for afragment shader to apply textures to the building segment thataccommodate different lighting conditions based on the followingformula: f (color)=T_(day)×(1.0-α)+T_(night)×α where T_(day) is a firsttexture used for the exterior of the building segment 804 during theday, T_(night) is a second texture used at night, and α is a parameterthat varies from full daylight (α=0.0) to full darkness (α=1.0) based onthe time of day and other lighting condition data in the 3D virtualenvironment. In the system 100, the processor 100 uses the clock 118 toidentify the time of day and optionally the time of year correspondingto different seasons. FIG. 8 depicts the same building model 804depicted on a sunny day (804), at night (812), and on a snowy day (816)for different values of a and using different sets of textures for thebuilding 804. In some embodiments, the processor 108 also receivesweather condition data from an external weather service via the networkdevice 152 to enable the system 100 to apply graphical effects todifferent regions based on the current weather conditions in eachregion.

As mentioned above, the system 100 identifies regions within thethree-dimensional virtual environment that receive procedurallygenerated building graphics based on the layout of a street networkwithin the three-dimensional virtual environment. FIG. 3 depicts aprocess 300 for identification of the regions within the street networkusing the system 100. In the discussion below, a reference to theprocess 300 performing a function or action refers to an operation of aprocessor to execute stored program instructions to perform the functionor action in association with other components in a graphics displaysystem. The process 300 is described in conjunction with the system 100of FIG. 1 and the depictions of FIG. 4 for illustrative purposes.

The process 300 begins as the processor 108 identifies intersections inthe street network from the 3D virtual environment data 124 (block 304).As described above, the 3D virtual environment data includes sets ofdata that identify streets including the sizes and shapes of streets inthe 3D virtual environment and intersections between streets. These dataare commonly used in navigation applications to route a person orvehicle to a destination. The processor 108 subsequently generatesdirected graphs between the intersections (block 308). In one embodimentthat is depicted in FIG. 4, the processor 108 generates directed graphswith “half edges”, which is to say that each edge in the graph thatconnects two intersections further includes two half edges that eachpoint in opposite directions. For example, in FIG. 4 the directed graph408 includes intersections 450 and 454 that are connected by half edges458 and 462. The half edge 458 is a first directed edge fromintersection 454 to 450 and the half edge 462 is a second half edge fromintersection 450 to intersection 454. During process 300 the system 100generates two half edges between connected intersections because asingle segment of the street often forms a border for two differentregions in the 3D virtual environment on either side of the street. Asset forth below, each half edge becomes a portion of the border for oneof the two regions.

Process 300 continues as the processor 108 traverses the half edges inthe directed graph to identify loops within the street network thatsurround regions within the 3D virtual environment that receive theprocedurally generated buildings. The processor 108 selects a first halfedge in the directed graph and marks the half edge as being visited(block 312). In the system 100, the processor 108 optionally associatesa Boolean value or other suitable data value with each half edge toindicate if the half edge has been “visited” or processed by theprocessor 108 during the graph traversal process. During the process300, the processor 108 uses the currently visited half edge in the graphto select the next half edge from the intersection at the end of thepreviously selected half edge based on the direction of half edges thatextend from the intersection (block 316). For example, in the graph 408of FIG. 4, the processor 108 visits the half edge 458 and identifies thenext half edge 466 based on the angle of the next half-edge based on theangle that most closely approximates a counter-clockwise direction turnfrom the intersection. As depicted visually in FIG. 4, the processor 108attempts a left hand (counter-clockwise) turns to select the next halfedge at each intersection to visit all of the half edges in the graph.

Process 300 continues iteratively as the processor 108 identifies if thenew current edge has already been visited (block 320). If the half edgehas not previously been visited, then the processor 108 marks thecurrent half edge as being visited (block 328) and the process 300returns to the processing described above with reference to block 316 toselect the next half edge. If the processor 108 selects the next halfedge that has already been visited (block 320) then the processor 108identifies all of the previously visited half edges that were visitedfrom either the first half edge or the half edges visited after thepreviously identified region in the 3D virtual environment assurrounding one region in the 3D virtual environment that includes theprocedurally generated buildings, and the processor 108 generates apolygon around the region corresponding to the shapes of the roads thatform the half edges around the region (block 324). For example, in FIG.4, the processor 108 identifies the half edges 458, 466, 470, and 474that form a loop around the region 406. The processor 108 visits thehalf edges as described above until returning to the previously visitedhalf edge 458, and the half edge 458 along with all of the half edgesthat were visited after the initial visit to the half edge 458 form aloop that encloses the region 406. As depicted in the drawing 412, theprocessor 108 generates the bounding polygon 416 based on the sizes andshapes of the streets that correspond to the half edges 458, 466, 470,and 474. While the half edges are depicted as straight lines forillustrative purposes, the bounding polygon may have segments thatapproximate curves and other features in streets if the streets are notformed in straight lines.

The process 300 continues as the processor 108 visits additional halfedges in the directed graph (block 332) with additional iterations ofthe processing described above with reference to blocks 316-328 to visitthe remaining half edges in the directed graph and identify anyadditional regions of the 3D virtual environment that are enclosed bythe streets. After all of the half edges in the graph have been visited,the system 100 uses the polygons that are generated around all of theidentified regions to form the procedurally generated buildings as isdescribed above in the process 200 (block 336). After completion of theprocess 300, the system 100 optionally stores the bounding polygons foreach region along with identification data, such as coordinates for thelocation of each region, with the 3D virtual environment data 124 in thememory 120. Consequently, the system 100 can perform the process 300relatively infrequently and have the cached region data available forthe process 200 without having to perform the process 300 each time thesystem 100 performs the process 200. The system 100 then performs theprocess 300 only for newly encountered street networks either when thestreet network data are updated to reflect new street layouts or if avehicle or mobile electronic device enters a new geographic region witha different street network.

It will be appreciated that variants of the above-disclosed and otherfeatures and functions, or alternatives thereof, may be desirablycombined into many other different systems, applications or methods.Various presently unforeseen or unanticipated alternatives,modifications, variations or improvements may be subsequently made bythose skilled in the art that are also intended to be encompassed by thefollowing claims.

What is claimed is:
 1. A method for generating graphics corresponding toa plurality of buildings in a three-dimensional virtual environmentcomprising: identifying, with a processor, a region in thethree-dimensional virtual environment that is enclosed by a plurality ofstreets within the three-dimensional virtual environment; generating,with the processor, a two-dimensional arrangement of a plurality oftiles within the region, each tile corresponding to a subset of buildingsegment graphics in a plurality of building segment graphics stored in amemory; identifying, with the processor, one building segment graphic inthe subset of building segment graphics for each tile in the pluralityof tiles based on an array of pseudo-random index values stored in thememory, each index value corresponding to one building segment graphicin the subset of building segment graphics; and generating, with theprocessor and a display device, a graphical depiction of thethree-dimensional virtual environment including a graphical depiction ofthe plurality of buildings in the region based on the two-dimensionalarrangement of the plurality of tiles and the one building segmentgraphic identified for each tile in the plurality of tiles.
 2. Themethod of claim 1 further comprising: identifying, with the processor, arectangular portion of the region in the three-dimensional virtualenvironment; and generating, with the processor, the two-dimensionalarrangement of the plurality of tiles only within the rectangularportion of the region.
 3. The method of claim 2, the generating of thetwo-dimensional arrangement of the plurality of tiles furthercomprising: generating, with the processor, the two-dimensionalarrangement within the rectangular portion of the region including afirst plurality of tiles having a first size, and a second plurality oftiles having a second size, the first size being greater than the secondsize, and the second plurality of tiles being formed in a margin of therectangular portion of the region that cannot include an additional tileof the first size.
 4. The method of claim 1 further comprising:identifying, with the processor, coordinates of the region within the 3Dvirtual environment; and retrieving, with the processor, the array ofpseudo-random index values from a plurality of arrays of pseudo-randomindex values from the memory based on the coordinates.
 5. The method ofclaim 1, the generating of the two-dimensional arrangement of theplurality of tiles within the region further comprising: assigning, withthe processor, a type code to each tile in the plurality of tiles basedon an arrangement of sides of each tile in the plurality of tiles thatare adjacent to another tile in the two-dimensional arrangement of theplurality of tiles; and identifying, with the processor, the subset ofbuilding segment graphics corresponding to each tile based on the typecode.
 6. The method of claim 1, the identifying of the region in thethree-dimensional virtual environment further comprising: identifying,with the processor, a plurality of streets and a plurality ofintersections between the plurality of streets in the three-dimensionalvirtual environment based on three-dimensional virtual environment datastored in the memory; generating, with the processor, a directed graphincluding two half edges formed each pair of intersections in theplurality of intersections that are connected by streets in theplurality of streets; and identifying the region in thethree-dimensional virtual environment based on a loop in a portion ofthe half edges in the directed graph that enclose the region.
 7. Themethod of claim 6 further comprising: generating, with the processor, abounding polygon around the region based on the plurality of streets inthe three-dimensional virtual environment that correspond to the halfedges in the directed graph that enclose the polygon; and generating,with the processor, the two-dimensional arrangement of a plurality oftiles within the bounding polygon.
 8. A graphics display systemcomprising: a display device; a memory configured to store datacorresponding to: a three-dimensional virtual environment including aplurality of streets; and a plurality of building segment graphics forbuildings in the three-dimensional virtual environment; and a processoroperatively connected to the memory and the display device, theprocessor being configured to: identify a region in thethree-dimensional virtual environment that is enclosed by the pluralityof streets within the three-dimensional virtual environment; generate atwo-dimensional arrangement of a plurality of tiles within the region,each tile corresponding to a subset of building segment graphics in theplurality of building segment graphics; identify one building segmentgraphic in the subset of building segment graphics for each tile in theplurality of tiles based on an array of pseudo-random index valuesstored in the memory, each index value corresponding to one buildingsegment graphic in the subset of building segment graphics; and generatea graphical depiction of the three-dimensional virtual environment withthe display device, the graphical depiction including a plurality ofbuildings in the region based on the two-dimensional arrangement of theplurality of tiles and the one building segment graphic identified foreach tile in the plurality of tiles.
 9. The system of claim 8, theprocessor being further configured to: identify a rectangular portion ofthe region in the three-dimensional virtual environment; and generatethe two-dimensional arrangement of the plurality of tiles only withinthe rectangular portion of the region.
 10. The system of claim 9, theprocessor being further configured to: generate the two-dimensionalarrangement within the rectangular portion of the region including afirst plurality of tiles having a first size, and a second plurality oftiles having a second size, the first size being greater than the secondsize, and the second plurality of tiles being formed in a margin of therectangular portion of the region that cannot include an additional tileof the first size.
 11. The system of claim 8, the processor beingfurther configured to: identify coordinates of the region within the 3Dvirtual environment; and retrieve, the array of pseudo-random indexvalues from a plurality of arrays of pseudo-random index values from thememory based on the coordinates.
 12. The system of claim 8, theprocessor being further configured to: assign a type code to each tilein the plurality of tiles based on an arrangement of sides of each tilein the plurality of tiles that are adjacent to another tile in thetwo-dimensional arrangement of the plurality of tiles; and identify thesubset of building segment graphics corresponding to each tile based onthe type code.
 13. The system of claim 8, the processor being furtherconfigured to: identify a plurality of streets and a plurality ofintersections between the plurality of streets in the three-dimensionalvirtual environment based on three-dimensional virtual environment datastored in the memory; generate a directed graph including two half edgesformed each pair of intersections in the plurality of intersections thatare connected by streets in the plurality of streets; and identify theregion in the three-dimensional virtual environment based on a loop in aportion of the half edges in the directed graph that enclose the region.14. The system of claim 13, the processor being further configured to:generate a bounding polygon around the region based on the plurality ofstreets in the three-dimensional virtual environment that correspond tothe half edges in the directed graph that enclose the polygon; andgenerate the two-dimensional arrangement of a plurality of tiles withinthe bounding polygon.